﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Surface.Core;
using Microsoft.Surface.Core.Manipulations;
using Microsoft.Xna.Framework;

namespace Sublimation
{
    public class TowerSurf :Tower {
        protected Tower_manipulator tower_manipulator;

        public TowerSurf(WorldProperties worldProperties, Player owner, Vector2 position, bool built)
            : base(worldProperties, owner, position, built)
        {  
            tower_manipulator = new Tower_manipulator(Game,position,(WorldPropertiesSurf)worldProperties,this);
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }

        public override Slot createSlotEnergy()
        {
            return new SlotEnergy(worldProperties, SlotKind.Energy_transmition, this);
        }

        public void add_contact(Contact contact)
        {
            tower_manipulator.add_contact(contact);
        }


        public bool belongs(Contact contact)
        {
            if ((contact.X - position.X) * (contact.X - position.X) + (contact.Y - position.Y) * (contact.Y - position.Y) < RADIUS * RADIUS)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
